//
//  ViewController.m
//  App
//
//  Created by gome on 2018/11/27.
//  Copyright © 2018 gome. All rights reserved.
//

#import "HomeViewController.h"
#import "AppManager.h"
#import "Base16.h"

@interface HomeViewController ()

@end

@implementation HomeViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    NSString *appName = [self infoPlistForKey:@"CFBundleDisplayName"];
    NSLog(@"Bundle Display Name:%@",appName);
    NSString *appServerIp = [self infoPlistForKey:@"AppServerIp"];
    NSLog(@"appServerIp:%@",appServerIp);
    NSString *bundleIdentifier = [self infoPlistForKey:@"CFBundleIdentifier"];
    NSLog(@"bundleIdentifier:%@",bundleIdentifier);
}


- (NSString *)infoPlistForKey:(NSString *)key {
    return [[NSBundle mainBundle].infoDictionary[key] stringByReplacingOccurrencesOfString:@"\\" withString:@""];
}


/**
 登出按钮事件

 @param sender 登出按钮
 */
- (IBAction)clickLogOutButton:(UIButton *)sender {
//    [[AppManager sharedInstance] showLoginPage];
    
    NSString *keyList = @"ABC1defg0abcijkz";
    NSString *base16 = [Base16 enCodeBase16String:@"hello + world ?" keyList:keyList];
    
    NSLog(@"%@\n", base16);
    NSString *origin = [Base16 deCodeBase16String:base16 keyList:keyList];
    NSLog(@"%@\n", origin);
}
@end
